package cn.com.gof.behavior.itertor;

/**
 * <p>Title: Client</p>  
 * <p>Description: </p>  
 * @author WangJun
 * @date 2018年9月10日 上午9:47:18
 */
public class Client {
	public static void main(String[] args) {
		ConctreteMyAggregate conctreteMyAggregate = new ConctreteMyAggregate();
		conctreteMyAggregate.add("aa");
		conctreteMyAggregate.add("bb");
		conctreteMyAggregate.add("vv");
		MyIterator iterator = conctreteMyAggregate.createIterator();
		
		while(iterator.hasNext()) {
			System.out.println(iterator.next());
		}
	}
}
